-
Notifications
You must be signed in to change notification settings - Fork 549
refactor: Store data in unhydrated nodes directly instead of wrapping MapTree nodes #24739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
CraigMacomber
merged 32 commits into
microsoft:main
from
CraigMacomber:unhydratedRefactor
Jun 9, 2025
Merged
refactor: Store data in unhydrated nodes directly instead of wrapping MapTree nodes #24739
CraigMacomber
merged 32 commits into
microsoft:main
from
CraigMacomber:unhydratedRefactor
Jun 9, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to unhydratedRefactor
…to unhydratedRefactor
…to unhydratedRefactor
CraigMacomber
added a commit
that referenced
this pull request
May 31, 2025
## Description Cleanups split out of #24739
…to unhydratedRefactor
CraigMacomber
commented
Jun 2, 2025
@@ -10,30 +10,24 @@ import { isFluidHandle } from "@fluidframework/runtime-utils/internal"; | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file and its functions have not been renamed yet to help simplify the diff.
A follow-up change will rename them.
CraigMacomber
commented
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
packages/dds/tree/src/simple-tree/node-kinds/object/objectNode.ts
Outdated
Show resolved
Hide resolved
Josmithr
reviewed
Jun 2, 2025
Josmithr
reviewed
Jun 2, 2025
noencke
reviewed
Jun 2, 2025
noencke
reviewed
Jun 2, 2025
noencke
reviewed
Jun 3, 2025
noencke
approved these changes
Jun 6, 2025
Josmithr
approved these changes
Jun 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: dds: tree
area: dds
Issues related to distributed data structures
base: main
PRs targeted against main branch
changeset-present
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement map tree APIs with UnhydratedFlexTreeNode directly instead of a wrapping a MapTree.
Store contextual default providers directly in a strongly typed way in the tree. Implicitly generate them using a global context if requested while unhydrated instead of special casing identifiers in the read code paths in multiple places.
Provide contextual defaults as part of prepare for hydration pass instead of its own pass.
Overall, this refactor should make the handling un unhydrated data simpler and more robust:
Breaking Changes
Defaulted Identifiers show up when enumerating fields on an unhydrated node.
This seems like an improvement/simplification (makes unhydrated and hydrated nodes more similar, and identifiers less special), but could theoretically break something.
Reviewer Guidance
The review process is outlined on this wiki page.